package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the destruction_yk database table.
 * 
 */
@Entity
@Table(name="destruction_yk")
@NamedQuery(name="DestructionYk.findAll", query="SELECT d FROM DestructionYk d")
public class DestructionYk implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="destruction_id")
	private int destructionId;

	@Column(name="destruction_number")
	private int destructionNumber;

	@Column(name="destruction_people")
	private String destructionPeople;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="destruction_time")
	private Date destructionTime;

	@Column(name="destruction_total_price")
	private BigDecimal destructionTotalPrice;
	
	@Column(name="destruction_static")
	private String destructionStatic;

	//bi-directional many-to-one association to DestructionDetailsYk
	@OneToMany(mappedBy="destructionYk")
	private List<DestructionDetailsYk> destructionDetailsYks;

	//bi-directional many-to-one association to Fanku
	@ManyToOne
	@JoinColumn(name="fanku_id")
	private Fanku fanku;

	public DestructionYk() {
	}

	public int getDestructionId() {
		return this.destructionId;
	}

	public void setDestructionId(int destructionId) {
		this.destructionId = destructionId;
	}

	public int getDestructionNumber() {
		return this.destructionNumber;
	}

	public void setDestructionNumber(int destructionNumber) {
		this.destructionNumber = destructionNumber;
	}

	public String getDestructionPeople() {
		return this.destructionPeople;
	}

	public void setDestructionPeople(String destructionPeople) {
		this.destructionPeople = destructionPeople;
	}

	public Date getDestructionTime() {
		return this.destructionTime;
	}

	public void setDestructionTime(Date destructionTime) {
		this.destructionTime = destructionTime;
	}

	public BigDecimal getDestructionTotalPrice() {
		return this.destructionTotalPrice;
	}

	public String getDestructionStatic() {
		return destructionStatic;
	}

	public void setDestructionStatic(String destructionStatic) {
		this.destructionStatic = destructionStatic;
	}

	public void setDestructionTotalPrice(BigDecimal destructionTotalPrice) {
		this.destructionTotalPrice = destructionTotalPrice;
	}

	public List<DestructionDetailsYk> getDestructionDetailsYks() {
		return this.destructionDetailsYks;
	}

	public void setDestructionDetailsYks(List<DestructionDetailsYk> destructionDetailsYks) {
		this.destructionDetailsYks = destructionDetailsYks;
	}

	public DestructionDetailsYk addDestructionDetailsYk(DestructionDetailsYk destructionDetailsYk) {
		getDestructionDetailsYks().add(destructionDetailsYk);
		destructionDetailsYk.setDestructionYk(this);

		return destructionDetailsYk;
	}

	public DestructionDetailsYk removeDestructionDetailsYk(DestructionDetailsYk destructionDetailsYk) {
		getDestructionDetailsYks().remove(destructionDetailsYk);
		destructionDetailsYk.setDestructionYk(null);

		return destructionDetailsYk;
	}

	public Fanku getFanku() {
		return this.fanku;
	}

	public void setFanku(Fanku fanku) {
		this.fanku = fanku;
	}

}